{% extends "base.html" %}
{% import 'bootstrap/wtf.html' as wtf %}

{% block app_content %}
    <h1>Hi, {{ current_user.username }}!</h1>
    <br>
    <div>
        <p>Create new flags!</p>
        {% if form %}
            {{ wtf.quick_form(form) }}
        {% endif %}
        <table id="flag_table" class="table">
            <thead class="thead-dark">
                <tr>
                    <th scope="col">#</th>
                    <th scope="col">Value</th>
                    <th scope="col">Created At</th>
                </tr>
            </thead>
            <tbody>
                {% for flag in flags %}
                    <tr>
                        <td scope="row">{{ loop.index }} </td>
                        <td>{{ flag.name }}</td>
                        <td>{{ flag.created_at }}</td>
                    </tr>
                {% endfor %}
            </tbody>
        </table>
    </div>
{% endblock %}